﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ProjectMadaktariMVC.Models.Procedure>" %>
<% ProjectMadaktariMVC.Models.Episode episode = (ProjectMadaktariMVC.Models.Episode)ViewData["episode"]; %>
<% using (Html.BeginForm())
       { %>
<div id="procedureForm">

    <div id="Procedure">
        <input type="submit" value="Save" /> <%= Html.ActionLink("Cancel", "ViewEpisode","Patient", null, null, "Procedure", new {episodeId = episode.episodeID, patientId = episode.patientID}, null) %>
        <div class="form_block">
            <span class="form_label">Procedure Date</span>
            <%= Html.TextBox("date", Model.date == null ? "" : ((DateTime)Model.date).ToString("MM/dd/yyyy"), new {@class = "datefield"}) %>
        </div>
        
        <div class="form_block">
            <span class="form_label">Procedure</span>
            <%= ProjectMadaktariMVC.Helpers.ConfigurationHelper.ProcedureDropDown("procedureTypeID", Model.procedureTypeID) %>
        </div>
        <div class="form_block">
            <span class="form_label">Anestesia</span>
            
            <%= (ProjectMadaktariMVC.Helpers.ConfigurationHelper.AnestesiaRadioButtons("anestesia", Model.anestesia)) %>
            
        </div>
        <div class="form_block">
            <span class="form_label">Surgeon</span>
            <%= ProjectMadaktariMVC.Helpers.ConfigurationHelper.SurgeonDropDown("surgeonID", Model.surgeonID) %>
        </div>
        <div class="form_block">
            <span class="form_label">Surgical Complications</span>
            <%= ProjectMadaktariMVC.Helpers.ConfigurationHelper.SurgicalComplicationsRadioButtons("complications", Model.complications) %>
        </div>
        <div class="form_block">
            <span class="form_label">Case Comments</span>
            <%= Html.TextArea("caseComments", Model.caseComments, new { cols="45", rows="5"}) %>
        </div>
        <div class="form_block">
            <span class="form_label">Image Findings</span>
            <%= Html.TextArea("imageFindings",Model.imageFindings, new {cols="45", rows="5"}) %>
        </div>
        <input type="submit" value="Save" /> <%= Html.ActionLink("Cancel", "ViewEpisode", new { episodeId = episode.episodeID, patientId = episode.patientID })%>
        
      </div>
   
    <%} %>
    
</div>

<script type="text/javascript">
    $(function() {
        $(".datefield").datepicker();
    });

</script>
